<tr>
    <td>{{ contact.name }}</td>
    <td>{{ contact.email }}</td>
    <td>{{ contact.created_at|date:"M d, Y" }}</td>
    <td>
        {% if contact.document %}
            <a href="{{ contact.document.url }}" class="btn btn-ghost btn-xs" target="_blank">
                Download Document
            </a>
        {% else %}
            <span class="text-red-500">No document</span>
        {% endif %}
    </td>
    <td>
        <button class="btn btn-xs btn-error"
                hx-delete="{% url 'contacts:delete-contact' contact.pk %}"
                hx-on:contact-deleted="this.closest('tr').remove();"
                hx-confirm="Are you sure you wish to delete this contact?"
        >
            Delete
        </button>
    </td>
</tr>